#include <iostream>
#include <string>
#include <functional>
#include <vector>
void print(const std::string &str, int num)
{
    std::cout << str << num << std::endl;
}

int main()
{
    // print("hello\n");
    using Task = std::function<void()>;
    std::vector<Task> array;
    array.push_back(std::bind(print, "hello", 10));
    array.push_back(std::bind(print, "linux", 20));
    array.push_back(std::bind(print, "c++", 30));
    array.push_back(std::bind(print, "pupu", 40));
    for (auto &f : array)
    {
        f();
    }
    return 0;
}